﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using kim.Common;
using System.Data;
using System.Text;

namespace kim.Web.UsersControls
{
    public partial class left : System.Web.UI.UserControl
    {

        protected string SlideText, title;
        protected void Page_Load(object sender, EventArgs e)
        {
            int fid = kim.Common.KIMRequest.GetInt("fid",0);
            if (fid == 7)
            {
                BindInfo();
            }
            else
            {
                examList.Visible = false;
            }
        }
        private void BindInfo()
        {
            rptexam.DataSource = new BLL.eg_news().GetModelList(20, "ClassID=2 and ChannelID=7", "Sort Desc");
            rptexam.DataBind();
        }
        public StringBuilder GetStrNewList(int top, int typeid, int channelID)
        {
            StringBuilder strNewList = new StringBuilder();
            List<Model.eg_news> newList = new kim.UI.BasePage().GetNewsList(top, typeid, channelID);
            foreach (Model.eg_news mo in newList)
            {

                strNewList.AppendFormat("<li><a href=\"newsDetails.aspx?id={0}&typeid={1}&fid={2}\">{3}</a></li>", mo.ID, mo.ClassID, mo.ChannelID, Utils.CutString(mo.Name, 25));
            }
            return strNewList;
        }
       
    }
}